package org.stwy.lease.returnmoney;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.stwy.lease.quit.QuitEntity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.rap.common.annotation.MetaData;
import com.rap.common.entity.AuditableEntity;
import com.rap.common.entity.BaseEntity;

/**
*版权信息 (c) RAP 保留所有权利.
*@author Rap.Codegen
*@Team RAP Team
*@Date 2015-4-25 9:33:07
*<p></p>
*
*@参与人：Rap.Codegen
*/
 
@MetaData(value = "退款")
@Entity
@Table(name = "stwy_return")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class ReturnEntity extends BaseEntity {
	private static final long serialVersionUID = 1L;
	@MetaData(value = "退还日期",comments="" )
	@Column(nullable = false)
	@Temporal(TemporalType.DATE)
	private Date returnDate;
	
	@MetaData(value = "退租记录")
	@ManyToOne
	@JoinColumn(name = "quitId")
	private QuitEntity quit;
	
	@MetaData(value = "退还租金",comments="" )
	@Column(nullable = true)
	private Double returnRent;
	
	@MetaData(value = "退还押金",comments="" )
	@Column(nullable = true)
	private Double returnDeposit;
	
	@MetaData(value = "备注",comments="" )
	@Column(nullable = true,length = 1000)
	private String remark;
	
	
	/**
	 * 退还日期
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
	public Date getReturnDate(){
		return this.returnDate;
	}
	public void setReturnDate(Date returnDate){
		this.returnDate = returnDate;
	}
	/**
	 * 退还租金
	 */
	public Double getReturnRent(){
		return this.returnRent;
	}
	public void setReturnRent(Double returnRent){
		this.returnRent = returnRent;
	}
	/**
	 * 退还押金
	 */
	public Double getReturnDeposit(){
		return this.returnDeposit;
	}
	public void setReturnDeposit(Double returnDeposit){
		this.returnDeposit = returnDeposit;
	}
	/**
	 * 备注
	 */
	public String getRemark(){
		return this.remark;
	}
	public void setRemark(String remark){
		this.remark = remark;
	}
	public QuitEntity getQuit() {
		return quit;
	}
	public void setQuit(QuitEntity quit) {
		this.quit = quit;
	}
	
}
